package com.csun.cmny.provider.service;

import com.csun.cmny.provider.model.vo.WatchOldmanAddressVo;
import com.csun.cmny.provider.service.hystrix.DmcDeviceFeignApiHystrix;
import com.csun.cmny.provider.service.hystrix.DmcWatchDataFeignApiHystrix;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-03-11 21:38
 * @Description:
 */
@FeignClient(value = "cmny-provider-dmc", configuration = OAuth2FeignAutoConfiguration.class, fallback = DmcWatchDataFeignApiHystrix.class)
public interface DmcWatchDataFeignApi {

    /**
     * 根据老人Id获取老人手环位置数据
     *
     * @param oldmanIds
     * @return
     */
    @PostMapping(value = "/api/dmc/watch/queryWatchOldmanAddressByOldmanIds")
    Wrapper<List<WatchOldmanAddressVo>> queryWatchOldmanAddressByOldmanIds(@RequestParam("oldmanIds") List<Integer> oldmanIds);
}
